package com.zy;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor   //生成全参构造器
@NoArgsConstructor    //生成无参构造器
@Builder              //生成builder模式->利用构造模式来创建对象

public class Person extends Object{

    private int id;
    private String name;
    private String sex;
    private int age;

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                '}';
    }


    // public String toString()
}
